﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Wrapper;

using modele.impl;
using modele.interfaces;

namespace Tests
{
    class Program
    {

        unsafe static void Main(string[] args)
        {
            WrapperAlgo w = new WrapperAlgo(25);

            for (int i = 0; i < 25; i++)
            {
                for (int j = 0; j < 25; j++)
                {
                    System.Console.Write(((w.getCase(i, j)&(1<<15))>>15)+" ");
                    //System.Console.Write(w.getCase(i, j)  + " ");
                }
                System.Console.WriteLine();
            }
            System.Console.WriteLine();
            System.Console.WriteLine();
            for (int i = 0; i < 25; i++)
            {
                for (int j = 0; j < 25; j++)
                {
                    System.Console.Write(((w.getCase(i, j) & 1 << 16) >> 16) + " ");
                    //System.Console.Write(w.getCase(i, j)  + " ");
                }
                System.Console.WriteLine();
            }
            System.Console.Write(w.getEmplacementVille(10, 10,0)+" "+w.getEmplacementVille(10, 10,1));
            Console.ReadLine();
            /*
            
            JoueurImpl j0 = new JoueurImpl("Jean-pierre","INFO");
            JoueurImpl j1 = new JoueurImpl("Jean-luc","EII");

            CarteImpl c = new CarteImpl(2);

            Desert d0 = new Desert();
            Desert d1 = new Desert();

            c.cases[0,0] = d0;
            c.cases[0,1] = d1;

            List<Unite> l00 = new List<Unite>();
            List<Unite> l11 = new List<Unite>();

            c.cases[0, 0].unites = l00;
            c.cases[0, 1].unites = l11;

            JeuImpl.INSTANCE.carte = c;

            EtudiantInfo i = new EtudiantInfo();
            i.joueur = j0;
            i.attaque = 4;
            i.defense = 4;
            i.x = 0;
            i.y = 0;
            i.mouvement = 4;
            i.vie = 10;


            EtudiantEii e = new EtudiantEii();
            e.joueur = j1;
            e.attaque = 4;
            e.defense = 2;
            e.x = 0;
            e.y = 1;
            e.vie = 2;


            JeuImpl j = JeuImpl.INSTANCE;

            Carte carteofshit = j.carte;

            Case c0 = carteofshit.getCase(0, 0);
            Case c1 = carteofshit.getCase(0, 1);

            List<Unite> l0 = c0.unites;
            List<Unite> l1 = c1.unites;

            l0.Add(i);
            l1.Add(e);


            UniteImpl u0 = (UniteImpl)JeuImpl.INSTANCE.carte.getCase(0, 0).unites.First();

            UniteImpl u1 = (UniteImpl)JeuImpl.INSTANCE.carte.getCase(0,1).unites.First();


            i.attaquer(0,1);

            System.Console.WriteLine();
            System.Console.WriteLine("Vie de i - Attaquant");
            System.Console.WriteLine(i.vie);


            System.Console.WriteLine("Vie de e - Defenseur ");
            System.Console.WriteLine(e.vie);

            System.Console.WriteLine("Position de i - Attaquant ");
            System.Console.WriteLine(i.x+"  "+i.y);


            System.Console.ReadLine();
              */
        }
    }
}
